Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/32 diff #388

Merged
merged 12 commits into from
Sep 25, 2019
Merged

Features/32 diff #388

merged 12 commits into from
Sep 25, 2019

Conversation

coquelin77
Copy link
Member

Description

Please include a summary of the change and which issue/s is/are fixed.
Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes: #32

Changes proposed:

  • added diff function

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Have you handled and tested all split configurations?
yes

@codecov
Copy link

codecov bot commented Sep 19, 2019

Codecov Report

Merging #388 into master will increase coverage by 0.04%.
The diff coverage is 98.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #388      +/-   ##
==========================================
+ Coverage   97.34%   97.38%   +0.04%     
==========================================
  Files          53       53              
  Lines       10395    10481      +86     
==========================================
+ Hits        10119    10207      +88     
+ Misses        276      274       -2
Impacted Files Coverage Δ
heat/core/tests/test_statistics.py 100% <ø> (ø) ⬆️
heat/core/tests/test_arithmetics.py 99.37% <100%> (+0.07%) ⬆️
heat/core/dndarray.py 95.27% <100%> (+0.02%) ⬆️
heat/core/arithmetics.py 98.76% <98%> (-1.24%) ⬇️
heat/core/communication.py 95.91% <0%> (+0.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b5d415...333459b. Read the comment docs.

heat/core/arithmetics.py Show resolved Hide resolved
heat/core/arithmetics.py Show resolved Hide resolved
heat/core/arithmetics.py Show resolved Hide resolved
heat/core/arithmetics.py Show resolved Hide resolved
if n < 0:
raise ValueError('diff requires that n be a positive number, got {}'.format(n))
if not isinstance(axis, int):
raise ValueError('axis must be an integer, is currently {}'.format(type(axis)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be sanitize_axis()

heat/core/arithmetics.py Outdated Show resolved Hide resolved
heat/core/arithmetics.py Show resolved Hide resolved
heat/core/dndarray.py Outdated Show resolved Hide resolved
@@ -279,6 +279,7 @@ def test_average(self):

# check weighted average over all float elements of split 3d tensor, across split axis
random_volume = ht.array(torch.randn((3, 3, 3), dtype=torch.float64), is_split=1)
# random_volume = ht.random.randn(3, 3, 3, dtype=ht.float64, split=)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove or use

@Markus-Goetz Markus-Goetz merged commit 31dab71 into master Sep 25, 2019
@Markus-Goetz Markus-Goetz deleted the features/32-diff branch September 25, 2019 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement diff()
2 participants